<?php

include_once('logic/action/Action.php');
include_once('logic/view/logout_view.php');


class LogoutAction extends Action
{
	public function perform ()
	{
		$View = new LogoutView();

		if (Session::getSessionVar ("logged_in") == 'true')
		{
			Session::setSessionVar("logged_in", 'false');
			Session::setSessionVar("logged_user", "");
			$View->setParam('_logout_successful', 'true');
		} else {
			$View->setParam('_logout_successful', 'false');
		}

		parent::setCommonParams($View);
		$View->display();
	}
}

?>
